<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>确认订单</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/detail.css" />
</head>
<body>
<div class="prodetail">
    <div class="address">
        <div class="add" style="background:none;">
            <a href="javascript:0;">
                <h3><span>店铺：{$store.storename}</span><span>{$store.mobile}</span></h3>
                <p>取货地址：{$store.address}</p>
            </a>
        </div>
    </div>
    <!--未填写地址-->
    <!--<div class="address" style="display:none;">-->
    <!--<a href="addressSelcet.html"><span>添加收货人信息</span></a>-->
    <!--</div>	-->
    <div class="prolist" onclick="window.location.href='__MODULE__/Exchange/index/gid/{$goods.id}'">
        <div class="pro">
            <div class="pic"><img src="<?=isMorePic($goods['head_img'])?>"/></div>
            <div class="name">
                <h2><b class="md" <eq name="goods['u_id']" value="0">style="background: #06d1de;"</eq> ><?=$goods['u_id']>0?'门店':'品牌';?></b>{$goods.title} {$goods.u_num}<?=getunit($goods['unit'])?></h2>
                <!--<h1>钻石|白金会员专享</h1>-->
                <h1 style="color:#666;">市场参考价：{$goods.price}元</h1>
                <h3 style="height:20px;"><em style="font-size:14px;">
                    <neq name="goods['level_cash']" value="0"><?=$goods['level_cash'].'元';?></neq>
                    <if condition="($goods['level_cash'] gt 0) AND ($goods['level_integral'] gt 0)">+</if>
                    <neq name="goods['level_integral']" value="0"><?=$goods['level_integral'].'积分';?></neq>
                </em><!--<i>（钻石专享）</i>--><b>X1</b></h3>
            </div>
        </div>
    </div>
    <!--<div class="number-pf">兑换数量<span class="num"><s class="reduce" onClick="ChangeNumber(-1)">-</s><input type="text" id="Number" value="1" class="Number"/><s class="Add" onClick="ChangeNumber(1)">+</s></span></div>-->
    <div class="deliver">取货方式<span style="background:none; padding-right:0;">社区店自提</span></div>
    <div class="total">共<b>1</b>件商品<span>合计：<i>
        <neq name="goods['level_cash']" value="0"><?=$goods['level_cash'].'元';?></neq>
                            <if condition="($goods['level_cash'] gt 0) AND ($goods['level_integral'] gt 0)">+</if>
        <neq name="goods['level_integral']" value="0"><?=$goods['level_integral'].'积分';?></neq>
    </i></span></div>
    <div class="word" style="margin-top:10px;">
        <h2>兑换须知</h2>
        <div class="inner">
            <p>1.本产品为恩施扶贫产品，需购买恩施地区的产品后，才可兑换该产品。</p>
            <p>2.兑换成功后，会收到二维码和通知，凭二维码到社区店取货</p>
            <p>3.社区店直接取货，产品质量有保证。</p>
        </div>
    </div>
    <div class="sure">
        <p style="font-size:12px;">应付金额：<em style="font-size:12px;">
            <neq name="goods['level_cash']" value="0"><?=$goods['level_cash'].'元';?></neq>
            <if condition="($goods['level_cash'] gt 0) AND ($goods['level_integral'] gt 0)">+</if>
            <neq name="goods['level_integral']" value="0"><?=$goods['level_integral'].'积分';?></neq>
        </em><b><!--（钻石专享）--></b></p>
        <input type="submit" value="提交订单" onClick="suborder()" style="width:28%;"/>
    </div>
</div>
<script  src="__PUBLIC__/Wx/js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script type="text/javascript">
    //提交订单
    function suborder() {
        var gid = {$goods['id']};//商品id
        var cid = {$store['c_id']};//小区id
        var total_fee = {$goods['level_cash']};//支付价格
        var level_integral = {$goods['level_integral']};//支付积分
        $.post("__MODULE__/Exchange/addorder",{'gid':gid,'cid':cid,'level_integral':level_integral,'total_fee':total_fee},function (d) {
            if (d.state > 0){
                layer.msg(d.val, {icon:1,time:3000});
            }else{
                window.location.href="__MODULE__/Exchange/choosePay/oid/"+d.id;
            }//end if
        });//end post
    }//end fun
</script>
</body>
</html>